package cn.hls.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
  *@fileName: ShipOrderGoods.java
  *@package: cn.hls.entity
　*@Description: 运单货物中间表
　*@author: yinghui.zhang
　*@email: uuhui@163.com
  *@date: 2016年6月19日
 *
 */
@Entity
@Table(name="T_SHIPORDER_GOODS")
@DynamicInsert
@DynamicUpdate
public class ShipOrderGoods extends BaseEntity {
	private static final long serialVersionUID = -8862844104974278254L;
	private Long shipOrderId;
	private Goods goods;//货物信息
	private Integer shipNum;// 托运件数
	private Float shipWeight;// 托运重量
	private Float shipVolume;// 托运容积
	private Float shipFee;// 托运费用
	
	public ShipOrderGoods(){
		
	}
	
	public ShipOrderGoods(Long shipOrderId){
		this.shipOrderId=shipOrderId;
	}
	@Column(name="shiporder_id")
	public Long getShipOrderId() {
		return shipOrderId;
	}
	public void setShipOrderId(Long shipOrderId) {
		this.shipOrderId = shipOrderId;
	}
	@ManyToOne(optional = true)
	@JoinColumn(name = "goods_id")
	@NotFound(action = NotFoundAction.IGNORE)
	public Goods getGoods() {
		return goods;
	}
	public void setGoods(Goods goods) {
		this.goods = goods;
	}
	@Column(name = "ship_num")
	public Integer getShipNum() {
		return shipNum;
	}

	public void setShipNum(Integer shipNum) {
		this.shipNum = shipNum;
	}

	@Column(name = "ship_weight")
	public Float getShipWeight() {
		return shipWeight;
	}

	public void setShipWeight(Float shipWeight) {
		this.shipWeight = shipWeight;
	}

	@Column(name = "ship_volume")
	public Float getShipVolume() {
		return shipVolume;
	}

	public void setShipVolume(Float shipVolume) {
		this.shipVolume = shipVolume;
	}

	@Column(name = "ship_fee")
	public Float getShipFee() {
		return shipFee;
	}

	public void setShipFee(Float shipFee) {
		this.shipFee = shipFee;
	}

}
